﻿/*
 * zhoujiliang02 创建于 2021/8/19 9:03:02
 */

using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
using VisionCloud.Domain.Common;
using VisionCloud.Domain.Filters;
using VisionCloud.Service.Ms;

namespace VisionCloud.Api.Controllers.Ms
{
    /// <summary>
    /// 项目编辑日志模块
    /// </summary>
    [SystemModule("项目日志相关")]
    [ApiAuthorize(PolicyEnum.RequireRolePermission)]
    [ApiVersion("1.0")]
    [Route("api/ms/[controller]/[Action]")]
    [ApiExplorerSettings(GroupName = "项目日志相关")]
    public class ProjectLogController : ApiBaseController
    {
        /// <summary>
        /// MsProjectEditLogService
        /// </summary>
        public MsProjectEditLogService MsProjectEditLogService { get; set; }

        /// <summary>
        /// 获取项目日志列表
        /// </summary>
        /// <param name="projectId"></param>
        /// <returns></returns>
        [HttpGet]
        [HttpPost]
        public async Task<ApiResult> GetList(string projectId)
        {
            return await TryCatchAsync(MsProjectEditLogService.GetLogsByProjectId(projectId));
        }
    }
}